home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / mail / sendmail / sendmail.sunos < prev    next >
Encoding:
Internet Message Format  |  1992-10-05  |  6.4 KB

  1. From: Paul Pomes <p-pomes@uiuc.edu>
  2. Date: Fri Sep  4 13:57:55 CDT 1992
  3. Subject: How to fix a cranky SUN sendmail system
  4. --------
  5. (Comments welcome)
  6.  
  7.         How to Fix a Cranky SUN Mail System.
  8.  
  9.  
  10. 1) Kill the existing sendmail daemon process.
  11.  
  12.    ps waux | grep sendmail
  13.    kill <pid>    where <pid> is the process id of the daemon.
  14.  
  15. 2) Replace the default sendmail executable with the SUN-supplied version
  16.    that understands use of the DNS.  Zap any frozen config file present.
  17.  
  18.    cd /usr/lib
  19.    cp sendmail sendmail.nomx
  20.    chmod 755 sendmail.nomx
  21.    cp sendmail.mx sendmail
  22.    chmod 4511 sendmail
  23.    rm -f /usr/lib/sendmail.fc /etc/sendmail.fc /etc/mail/sendmail.fc
  24.  
  25. 3) Establish a /etc/resolv.conf file to direct DNS queries to a server.
  26.    The values of "domain" and the "nameserver" lines depends critically
  27.    on where you are.  At the University of Illinois the value of domain
  28.    is typically your department or office name combined with "uiuc.edu".
  29.    Long names, e.g., Personnel Services Office, are typically abbreviated
  30.    (pso.uiuc.edu).  Examples: math.uiuc.edu, life.uiuc.edu, ncsa.uiuc.edu.
  31.  
  32.    Some institutions have a one domain fits all name.  An example of
  33.    this is the US Army Corps of Engineers, Construction Engineering
  34.    Research Lab locally known as US Army CERL.  Army policy specifies
  35.    that domain names must use their official acronym with the "army.mil"
  36.    domain.  So CERL's domain name is "cecer.army.mil".  Adding a fourth
  37.    domain to distinguish internal departments and divisions would have
  38.    made the names overly long.  Thus all CERL hosts are named
  39.    foo.cecer.army.mil.
  40.  
  41.    Selecting nameservers must be done in consultation with your local
  42.    network expert.  At the University of Illinois (and ONLY here please)
  43.    the following values can be used.
  44.  
  45.    domain foo.uiuc.edu        (replace foo with your official domain)
  46.    nameserver 128.174.5.59
  47.    nameserver 128.174.5.50
  48.    nameserver 128.174.5.58
  49.  
  50.    At US Army CERL, use the following:
  51.  
  52.    domain cecer.army.mil
  53.    nameserver 129.229.20.254
  54.    nameserver 129.229.1.5
  55.  
  56.    N.B., SUN's resolver code is based on BIND v4.8.1 and suffers from several
  57.    problems.  Chief among those is zero fault tolerance.  If the first listed
  58.    nameserver is unreachable or dead, the resolver won't try any of the
  59.    subsequently listed servers.  Re-compiling both sendmail and libresolv.a
  60.    from modern sources is the only fix for this.
  61.  
  62. 4) Copy the "main" sendmail.cf base file to sendmail.cf.
  63.    Under SUN-OS 4.X use
  64.  
  65.    cp /usr/lib/sendmail.main.cf /etc/sendmail.cf
  66.  
  67.    Under SUN-OS 5.X use
  68.  
  69.    cd /etc/mail
  70.    cp main.cf sendmail.cf
  71.  
  72.  
  73. Now that the base work has been done you have a choice: death or chi-chi.
  74. No, that's another sick joke.  Let's stick to SUNs and retain what shreds
  75. of dignity we can.  Onward.
  76.  
  77. The next set of steps involve changes to the sendmail.cf file.  Invoke the
  78. editor of your choice on /etc/sendmail.cf or /etc/mail/sendmail.cf.
  79.  
  80. 5) Change the value of the $j greeting macro.  Macros are defined with
  81.    lines beginning with 'D'.  Thus the $j macro is defined on a line
  82.    beginning with 'Dj'.  Change sendmail.cf (nee main.cf) to look like
  83.  
  84.    # my official hostname
  85.    # You have two choices here.  If you want the gateway machine to identify
  86.    # itself as the DOMAIN, use this line:
  87.    #Dj$m
  88.    # If you want the gateway machine to appear to be INSIDE the domain, use:
  89.    #Dj$w.$m
  90.    # Unless you are using sendmail.mx (or have a fully-qualified hostname), use:
  91.    Dj$w
  92.  
  93.    (Comment out the Dj$m entry and enable the Dj$w entry.)
  94.  
  95. 6) Select the proper mailer for forwarding to a smarter relay.  In the
  96.    case of a site connected to the Internet, this is the "ddn" mailer.
  97.    Change to:
  98.  
  99.    # major relay mailer - typical choice is "ddn" if you are on the
  100.    # Defense Data Network (e.g. Arpanet or Milnet)
  101.    #DMsmartuucp
  102.    DMddn
  103.  
  104. 7) Select the smarter relay to handle messages to unknown destinations.
  105.    This MUST be selected on a per-site basis.
  106.  
  107.    At the University of Illinois *ONLY*
  108.  
  109.    # major relay host: use the $M mailer to send mail to other domains
  110.    DRux1.cso.uiuc.edu
  111.    CRux1.cso.uiuc.edu
  112.  
  113.    At the US Army CERL *ONLY*
  114.  
  115.    # major relay host: use the $M mailer to send mail to other domains
  116.    DRmax.cecer.army.mil
  117.    CRmax.cecer.army.mil
  118.  
  119. 8) Configure your domain names.  Replace the foo.bar.uiuc.edu names below
  120.    with your host's FQDN.
  121.  
  122.    #################################################
  123.    #
  124.    #    General configuration information
  125.     ...
  126.    # Example:                (bogus examples, ignore)
  127.    # DmCS.Podunk.EDU
  128.    # Cm cs cs.Podunk.EDU
  129.    Dwfoo.bar.uiuc.edu
  130.    Dmfoo.bar.uiuc.edu
  131.  
  132. 9) Change the ddn mailer rules in ruleset 0 according to the comments there.
  133.    Ruleset 0 is labelled by a line containing only "S0".  About 40 lines
  134.    further down are the following rulesets.
  135.  
  136.    # Pass other valid names up the ladder to our forwarder
  137.    #R$*<@$*.$=T>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@domain.known
  138.  
  139.    # Replace following with above to only forward "known" top-level domains
  140.    #R$*<@$*.$+>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain
  141.  
  142.    # if you are on the DDN, then comment-out both of the the lines above
  143.    # and use the following instead:
  144.    R$*<@$*.$+>$*    $#ddn $@ $2.$3 $:$1<@$2.$3>$4    user@any.domain
  145.  
  146.    Follow the comments and comment out the second rule that forwards
  147.    only "known" domains and enable the following rule that uses the "ddn"
  148.    mailer.
  149.  
  150. Write the sendmail.cf file back out and leave the editor.  Now test the
  151. changes by using sendmail in test mode.
  152.  
  153. 10) Test address recognition.  Invoke sendmail in address test mode:
  154.  
  155.    /usr/lib/sendmail -bt
  156.  
  157.    Run the following address forms through one at a time.  The leading 0
  158.    is the starting ruleset.  Each address should resolve to "user" using
  159.    the "local" mailer.  Replace "foo" and "bar.uiuc.edu" with the name
  160.    of your host and domain.
  161.  
  162.    0 user
  163.    0 user@foo
  164.    0 user@foo.bar.uiuc.edu
  165.  
  166. 11) Verify out-going addresses are correct.  Use the -v option to Berkeley
  167.    mail to check that the return addresses are correct.  If -v doesn't
  168.    work with your mailer, use sendmail direct.
  169.  
  170.    Mail -v nobody@ucbvax.berkeley.edu < /dev/null
  171.       or
  172.    /usr/lib/sendmail -v nobody@ucbvax.berkeley.edu < /dev/null
  173.  
  174. 12) Fire up sendmail in daemon mode.
  175.  
  176.    /usr/lib/sendmail -bd -q1h
  177.  
  178. 13) Test in-bound mail.  From another host, verify that mail sent to a
  179.    user that has no forwarding set up, either via /etc/aliases or
  180.    .forward file, actually arrives.  Telnet to the SMTP port and verify
  181.    that the greeting message uses the fully qualified domain name.
  182.  
  183.    telnet foo.bar.uiuc.edu 25
  184.  
  185.    quit
  186.